package quik.member;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import comm.util.QuikHashMap;
import comm.util.RequestManager;

public class QuikUserPage extends HttpServlet {
	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		//Servlet 상속
		String memberSeq = null;
		String path = request.getPathInfo();
		String arr[] = path.split("/");
		if(arr.length==2)
			memberSeq = arr[1];
		
		if(memberSeq!=null){
			RequestDispatcher toPage = request.getRequestDispatcher("/?content=mypage&menu=profile&member_seq="+memberSeq);
			toPage.forward(request, response);
		}else{
			//넘어온 member_seq가 없다면 나의 프로필 페이지로
			response.sendRedirect(request.getContextPath()+"/?content=mypage&menu=profile");
		}
	}
}
